﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string str = TextArea1.InnerText;
            if (String.IsNullOrEmpty(str))
            {
                TextArea1.InnerText = "内容为空，请输入新闻内容！";
            }
            else
            {
                TextArea1.InnerText = "提交成功！";
            }
            Label4.Text = DateTime.Now.ToString("d");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            TextArea1.InnerText = "";
            Label4.Text = "";
        }
    }
}